﻿using LY.DataAccess.Repository;
using LY.Entity;
using LY.Entity.Entities;
using LY.Entity.PageSearch;
using LY.Entity.SearchEntity;
using LY.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace LY.Business.ServiceImpl
{
    public class BlackMemberService : IBlackMemberService
    {
        /// <summary>
        /// 黑名单
        /// </summary>
        /// <returns></returns>
        BlackMemberRepository _black;
        public BlackMemberService()
        {
            _black = new BlackMemberRepository();
        }
        //添加
        public long AddBlackMember(Entity.U_BlackMember BlackMember)
        {
            return _black.AddBlackMember(BlackMember);
        }
        //删除
        public int DeleteBlackMember(int id)
        {
            return _black.DeleteBlackMember(id);
        }
      
        //获取所有黑名单
        public PagedList<U_BlackMember_EX> SelestBlackMember(BlackMemberSearch search, PageView view)
        {
            return _black.QueryBlackMemberList(search, view);
        }
        //根据ID获取单个黑名单
        public U_BlackMember getBlackMember(int? id)
        {
            return _black.getBlackMember(id);
        }
        //修改
        public int UpdateBlackMember(Entity.U_BlackMember BlackMember)
        {
            return _black.UpdateBlackMember(BlackMember);
        }
        //修改会员状态
        public int updateMemberStutas(Entity.U_Member member)
        {
            return _black.updateMemberStatus(member);
        }

    }
}
